<?php
class tpl_index {
	public function call ($toObj) {
		$toObj->attr ('xmlns', 'http://www.w3.org/1999/xhtml');
		Y('Document.load', 'common/header');
		
		$body = $toObj->DOG_appendChild ('body');
		$content = $body->DOG_appendChild ('div');
		$content->addClass('contents');

		$top = $content->DOG_appendChild ('div');
		$top->addClass('top');
		Y('Document.load', 'common/title', $top);

		$left = $content->DOG_appendChild ('div');
		$left->addClass('side left');
		Y('Document.load', 'common/left', $left);

		$main = $content->DOG_appendChild ('div');
		$main->addClass('main');
		
		$tp = $main->DOG_appendChild ('div');
		$tp->addClass ('topicpath');
		$tp->html ('トップ');
		
		$ch = $main->DOG_appendChild ('div');
		$ch->addClass('c_header');

		$main->DOG_appendChild ('p')->html (
'　ただのヒマ人、結城真のくだらない日々です。<br />
　まとまりのないサイトなのです。'
		);

		$main->DOG_appendChild ('p')->html (
'　以下、最新記事。'
		);


		Y('Module.load', 'blog');

		$this->Blog['CommentForm'] = false;
		$this->Blog['Tag'] = true;
		foreach ((array)Y('Module.List.Blog.getLatestArticles', 10) as $Article) {
			$this->Article = $Article;
			Y('Output.Body', 'blog/part/article');
		}

		$right = $content->DOG_appendChild ('div');
		$right->addClass('side right');
		Y('Document.load', 'common/right', $right);
		
		Y('Document.load', 'common/footer', $content);
		return true;
	}
}
?>